MTree – A tree list with an attached titled panel.
Creation: MTree_New(caption$, sortmode, x, y, pixelwidth, pixelheight)
caption$ - List title caption text.
sortmode – Unused, not implemented. Tree lists are not sorted at this time.
x – Pixel X coordinate for the top left corner of the list.
y – Pixel Y coordinate for the top left corner of the list.
pixelwidth – The width of the list in pixels.
pixelheight – The height of the list in pixels.
Functions:
MList_AddItem(index, text$, referencekey, indentation, expand)
Adds a text string to the list. Optional unique reference key number. 0; some unique number.
Indentation is the level of indentation the item being added will have. You add items to this list by figuring out the level of indentation for each item beforehand.
Expand sets whether the item will initially appear expanded in the list. 0;1
MList_Clear(index)
Clears the entire list of contents.
MList_ClearSelected(index)
Deselects the currently selected list item.
MList_Delete(index)
Deletes the list.
MList_Disable(index)
Disables the list. Prevents user input changes.
MList_Draw(index)
Draws the list to screen.
MList_Enable(index)
Enables the list. Restores user input changes.
Mlist_Find(index, text$)
Returns list-index of given string if string is stored in list.
Mlist_FindKey(index, referencekey)
Returns list-index of given reference key if it is stored in list.
MList_GetCount(index)
Returns the number of items in the list.
MList_GetSelected(index)
Returns string, the text of item selected in the list.
MList_GetSelectedIndex(index)
Returns the list index of item selected in the list.
MList_GetSelectedKey(index)
Returns the list reference key of item selected in the list.
MList_SetCaption(index, caption$)
Sets the title text of the list.
MList_SetSelected(index, list-index)
Sets the selected item of the list.
MList_SetSelectedKey(index, referencekey)
Sets the selected item of the list to item matching given reference key.